import request  from "../utils/request"

interface IRleResp{
    list:IRole[]
}



/**
 * 查询所有角色信息
 */
export const getAllRoles = () =>request.get<any,IRleResp>("/api/v1/admin/roles")



/***
 * 角色的添加
 */
export const addRole = (data:IRole) => request.post("/api/v1/admin/roles",data)


// 修改角色

export const editRole = (data:IRole) => request.put("/api/v1/admin/roles/" + data.id,data)


/***
 * 删除角色
 */
export const delRole = (id:string) => request.delete("/api/v1/admin/roles/" + id)